<template>
    <div class="loading">
        <img src="~@/assets/logo.png" alt="">
        <div>加载页面</div>
        <router-link :to="{name:'商城首页'}">商城首页</router-link>
    </div>
</template>
<script>
export default {
    data(){
        return {
            user:"nima",
            role:3
        }
    },
    methods:{
        fun(){
            Vue.default.user["role"] = this.role;
            if(Vue.default.user.role==3){
                console.log(Vue.default.user)
                setTimeout(()=>{
                    this.$router.push({name:"商城首页"})
                },1000)
            }
            
        }
    },
    created(){
        this.fun()
    }
}
</script>